var mongoose = require('mongoose');
//const materializedPlugin = require('mongoose-materialized');
const Schema = mongoose.Schema;
const mongoosePaginate = require('mongoose-paginate');


//tree字段为text
var CommentSchema = new mongoose.Schema({
    newsID:String,
    content:String,
    rate:Number,
    date:{type:Date,default: Date.now }
});
CommentSchema.plugin(mongoosePaginate);

// CommentSchema.plugin(materializedPlugin);
module.exports = mongoose.model('Comment', CommentSchema,'comment'); // Category